<?php
namespace app\ice\model;
use think\Db;
use think\Model;
class User extends Model
{
    protected $table = 'ig_user_info';
    // 查看首页详情
    public function getUserInfo($openid)
    {	
    	$where['openid'] = $openid;
        $data = $this->where($where)->find();
        return $data;
    }

    public function getUserData($param)
    {   
        $where['id'] = $param['uid'];
        $data = $this->where($where)->find();
        return $data;
    }

    public function addUser($data)
    {	
        $result = $this->save($data);
        return $result;
    }
}